home *** CD-ROM | disk | FTP | other *** search
/ 9-Digit Zip Code Directory / 9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO / z4src.zip / CUSTCNTL.H < prev    next >
C/C++ Source or Header  |  1993-11-23  |  4KB  |  106 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * custcntl.h -  Custom Control Library header file                            *
  4. *                                                                             *
  5. *               Copyright (c) 1992, Microsoft Corp.  All rights reserved      *
  6. *                                                                             *
  7. \*****************************************************************************/
  8.  
  9. #ifndef _INC_CUSTCNTL
  10. #define _INC_CUSTCNTL
  11.  
  12. #ifndef RC_INVOKED
  13. #pragma pack(1)         /* Assume byte packing throughout */
  14. #endif /* RC_INVOKED */
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {            /* Assume C declarations for C++ */
  18. #endif  /* __cplusplus */
  19.  
  20. /*
  21.  * Every custom control DLL must have three functions present,
  22.  * and they must be exported by the following ordinals.
  23.  */
  24. #define CCINFOORD       2       /* information function ordinal */
  25. #define CCSTYLEORD      3       /* styles function ordinal */
  26. #define CCFLAGSORD      4       /* translate flags function ordinal */
  27.  
  28. /* general size definitions */
  29. #define CTLTYPES        12      /* max number of control types */
  30. #define CTLDESCR        22      /* max size of description */
  31. #define CTLCLASS        20      /* max size of class name */
  32. #define CTLTITLE        94      /* max size of control text */
  33.  
  34. /*
  35.  * CONTROL STYLE DATA STRUCTURE
  36.  *
  37.  * This data structure is used by the class style dialog function
  38.  * to set and/or reset various control attributes.
  39.  *
  40.  */
  41. typedef struct tagCTLSTYLE
  42. {
  43.     UINT    wX;                 /* x origin of control */
  44.     UINT    wY;                 /* y origin of control */
  45.     UINT    wCx;                /* width of control */
  46.     UINT    wCy;                /* height of control */
  47.     UINT    wId;                /* control child id */
  48.     DWORD   dwStyle;            /* control style */
  49.     char    szClass[CTLCLASS];  /* name of control class */
  50.     char    szTitle[CTLTITLE];  /* control text */
  51. } CTLSTYLE;
  52. typedef CTLSTYLE *      PCTLSTYLE;
  53. typedef CTLSTYLE FAR*   LPCTLSTYLE;
  54.  
  55. /*
  56.  * CONTROL DATA STRUCTURE
  57.  *
  58.  * This data structure is returned by the control options function
  59.  * when inquiring about the capabilities of a particular control.
  60.  * Each control may contain various types (with predefined style
  61.  * bits) under one general class.
  62.  *
  63.  * The width and height fields are used to provide the host
  64.  * application with a suggested size.  The values in these fields
  65.  * are in rc coordinates.
  66.  *
  67.  */
  68. typedef struct tagCTLTYPE
  69. {
  70.     UINT    wType;              /* type style */
  71.     UINT    wWidth;             /* suggested width */
  72.     UINT    wHeight;            /* suggested height */
  73.     DWORD   dwStyle;            /* default style */
  74.     char    szDescr[CTLDESCR];  /* description */
  75. } CTLTYPE;
  76.  
  77. typedef struct tagCTLINFO
  78. {
  79.     UINT    wVersion;           /* control version */
  80.     UINT    wCtlTypes;          /* control types */
  81.     char    szClass[CTLCLASS];  /* control class name */
  82.     char    szTitle[CTLTITLE];  /* control title */
  83.     char    szReserved[10];     /* reserved for future use */
  84.     CTLTYPE Type[CTLTYPES];     /* control type list */
  85. } CTLINFO;
  86. typedef CTLINFO *       PCTLINFO;
  87. typedef CTLINFO FAR*    LPCTLINFO;
  88.  
  89. /* These two function prototypes are used by the dialog editor */
  90. #ifdef STRICT
  91. typedef DWORD   (CALLBACK* LPFNSTRTOID)(LPCSTR);
  92. #else
  93. typedef DWORD   (CALLBACK* LPFNSTRTOID)(LPSTR);
  94. #endif
  95. typedef UINT    (CALLBACK* LPFNIDTOSTR)(UINT, LPSTR, UINT);
  96.  
  97. #ifdef __cplusplus
  98. }
  99. #endif  /* __cplusplus */
  100.  
  101. #ifndef RC_INVOKED
  102. #pragma pack()
  103. #endif  /* RC_INVOKED */
  104.  
  105. #endif  /* _INC_CUSTCNTL */
  106.